package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 试题题目选项DTO
 *
 * @author: yangyongchuan
 * @create: 2020年08月21日 01:16
 */
@ApiModel("试题题目选项DTO")
@Data
public class QuestionChooseDTO implements BaseDTO {
	private static final long serialVersionUID = -5408214981574967543L;
	/**
	 * 选项ID
	 */
	@ApiModelProperty(value = "选项ID")
	private Integer chooseId;
	/**
	 * 选项
	 */
	@ApiModelProperty(value = "选项", example = "A")
	@NotNull(message = "题目选项不能为空", groups = {Edit.class})
	@NotEmpty(message = "题目选项不能为空", groups = {Edit.class})
	private String choose;

	/**
	 * 选项对应内容
	 */
	@ApiModelProperty(value = "选项对应内容", example = "   ")
	@NotNull(message = "题目选项内容不能为空", groups = {Edit.class})
	@NotEmpty(message = "题目选项内容不能为空", groups = {Edit.class})
	private String solution;

	/**
	 * 是否为正确答案 1-是 2-否
	 */
	@ApiModelProperty(value = "是否为正确答案 1-是 2-否", example = "2")
	@NotNull(message = "是否为正确答案不能为空", groups = {Edit.class})
	private Integer isAnswer;

}
